package com.company.common.encrypt;

import org.apache.commons.codec.digest.DigestUtils;

public class MD5 {

    public String encode(String content)
    {
        return  DigestUtils.md5Hex(content);
    }

    public boolean validate(String md5,String content)
    {
        String temp = DigestUtils.md5Hex(content);
        if (temp.equals(md5))
        {
            return true;
        }
        return false;
    }

}
